/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const systemRouter = {
    path: '/system',
    component: Layout,
    redirect: '/systme',
    alwaysShow: true, // will always show the root menu
    name: '系统管理',
    meta: {
      title: '系统管理',
      icon: 'lock',
      roles: ['admin', 'editor'] // you can set roles in root nav
    },
    children: [
      {
        path: 'user',
        component: () => import('@/views/system/user/index'),
        name: '用户管理',
        meta: {
          title: '用户管理',
          roles: ['admin'] // or you can only set roles in sub nav
        }
      },
      {
        path: 'role',
        component: () => import('@/views/system/role/index'),
        name: '角色管理',
        meta: {
          title: '角色管理',
          roles: ['admin']
        }
      },
      {
        path: 'menu',
        component: () => import('@/views/system/menu/index'),
        name: '菜单管理',
        meta: {
          title: '菜单管理'
          // if do not set roles, means: this page does not require permission
        }
      }
    ]
  }

export default systemRouter
